
#ifndef __LOG_TARGET_FILE__
#define __LOG_TARGET_FILE__

#include "LogTarget.h"
#include <fstream>

namespace woe
{

	class TUTIL_API LogTargetFile : public LogTarget
	{
	public:
		LogTargetFile(const string& file);
		virtual ~LogTargetFile();

		//
		//	initialize target
		//
		virtual bool initialize();

		//
		//	send log to target
		//
		virtual void doLog(const string& msg, const string& ll, const TimeStamp& ts);
	protected:
		string		log_file_name_;
#ifdef UNICODE
		std::wofstream	log_file_stream_;
#else
		std::ofstream	log_file_stream_;
#endif
	};

}

#endif
